﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Comet.ViewModel;

namespace Comet.View.Wpf
{
    public partial class HostWpfControlFormWindow : Form
    {
        public HostWpfControlFormWindow()
        {
            InitializeComponent();
        }

        public HostWpfControlFormWindow(DataMembersViewModel viewModel) : this()
        {
            if (viewModel == null)
            {
                throw new ArgumentNullException("viewModel");
            }

            DataMembersView userControl = this.elementHost.Child as DataMembersView;
            userControl.ParentForm = this;
            userControl.DataContext = viewModel;            
        }
    }
}
